import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:xingsu/page/set/viewModel/set_viewmodel.dart';
import 'package:xingsu/util/use_preferences.dart';
import 'package:xingsu/util/widget_util.dart';
import 'package:get/get.dart';

class SetPage extends StatelessWidget {
  final SetViewModel _viewModel = Get.put(SetViewModel());

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("设置"),
      ),
      body: ListView(
        padding: const EdgeInsets.symmetric(horizontal: 15),
        children: [
          UserPreferences.getIsLogin()
              ? WidgetUtil.btnWidget(
                  title: "退出登录", clickCallback: _viewModel.logout)
              : const SizedBox(),
        ],
      ),
    );
  }

}
